package com.wy.allthingdone.views;

import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;

import com.wy.allthingdone.interfaces.OnLoadMoreListener;
import com.wy.allthingdone.interfaces.OnRefreshListener;

/**
 * Created by 38270 on 2016/11/4.
 */

public class RecyclerViewWithScroLis extends RecyclerView {
    private OnRefreshListener mRefreshListener;//刷新接口
    private OnLoadMoreListener mLoadMoreListener;//加载更多接口
    private float mLastY = -1;//初始Y值
    private boolean pullRefreshEnabled = true;//下拉刷新可用

    public RecyclerViewWithScroLis(Context context, @Nullable AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public RecyclerViewWithScroLis(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public RecyclerViewWithScroLis(Context context) {
        super(context);
    }

    @Override
    public void setAdapter(Adapter adapter) {
        super.setAdapter(adapter);
    }


    public void setOnRefreshListener(OnRefreshListener listener) {
        mRefreshListener = listener;
    }

    public void setOnLoadMoreListener(OnLoadMoreListener listener) {
        mLoadMoreListener = listener;
    }


}
